<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>FullTag (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
  </script>

  <script src="static/js/doc.js">
  </script>

  <meta charset="utf8">
</head>

<body onload="prettyPrint()">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
        <span class="fn">dom.pattern.FullTag</span>
        <span>Extends</span>
        <span class="fn-name">
          <a href="class_goog_dom_pattern_StartTag.html">
            goog.dom.pattern.StartTag</a>
        </span>
</div>

<div class="g-section g-tpl-75-25">
  <div class="g-unit g-first" id="description">
    Pattern object that matches a full tag including all its children.
  </div>


        <div class="g-unit" id="useful-links">
          <div class="title">Useful links</div>
          <ol>
            <li><a href="closure_goog_dom_pattern_fulltag.js.source.html"><span class='source-code-link'>Source Code</span></a></li>
          </ol>
        </div>
</div>






<h2 class="g-first">Inheritance</h2>
<pre class="inheritance">
Object
     <img src="static/images/inherit.gif"><span class="type"><a href="class_goog_dom_pattern_AbstractPattern.html">goog.dom.pattern.AbstractPattern</a></span>
          <img src="static/images/inherit.gif"><span class="type"><a href="class_goog_dom_pattern_Tag.html">goog.dom.pattern.Tag</a></span>
               <img src="static/images/inherit.gif"><span class="type"><a href="class_goog_dom_pattern_StartTag.html">goog.dom.pattern.StartTag</a></span>
                    <img src="static/images/inherit.gif">goog.dom.pattern.FullTag
</pre>




  <h2>Constructor</h2>
      <div class="fn-constructor">
    goog.dom.pattern.FullTag(<span><span class="arg">tag</span>,&nbsp;<span class="arg">opt_attrs</span>,&nbsp;<span class="arg">opt_styles</span>,&nbsp;<span class="arg">opt_test</span></span>)
  </div>

   <h3>Parameters</h3>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">tag</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span><span>&nbsp;|&nbsp;</span><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp">RegExp</a></span></div>
        <div class="entryOverview">Name of the tag.  Also will accept a regular expression to match against the tag name.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_attrs</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span></div>
        <div class="entryOverview">Optional map of attribute names to desired values. This pattern will only match when all attributes are present and match the string or regular expression value provided here.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">opt_styles</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span></div>
        <div class="entryOverview">Optional map of CSS style names to desired values. This pattern will only match when all styles are present and match the string or regular expression value provided here.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_test</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span></div>
        <div class="entryOverview">Optional function that takes the element as a parameter and returns true if this pattern should match it.</div>
     </td>
   </tr>
  </table>


<h2>Instance Methods</h2>


  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_dom_pattern_FullTag.html">
              goog.dom.pattern.FullTag
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.dom.pattern.FullTag.prototype.matchToken"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">matchToken<span class="args">(<span class="arg">token</span>,&nbsp;<span class="arg">type</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type">goog.dom.pattern.MatchType</span></div>
      </div>


     <div class="entryOverview">
       Test whether the given token is a start tag token which matches the tag name,
style, and attributes provided in the constructor.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">token</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/DOM/Node">Node</a></span></div>
        <div class="entryOverview">Token to match against.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">type</span>
        : <div class="fullType"><span class="type">goog.dom.TagWalkType</span></div>
        <div class="entryOverview">The type of token.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type">goog.dom.pattern.MatchType</span></div>&nbsp;
            <code>MATCH</code> at the end of our tag, <code>MATCHING</code> if we are within the tag, and <code>NO_MATCH</code> if the starting tag does not match.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_dom_pattern_fulltag.js.source.html#line72">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_dom_pattern_Tag.html">
              goog.dom.pattern.Tag
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.dom.pattern.Tag.prototype.matchToken"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">matchToken<span class="args">(<span class="arg">token</span>,&nbsp;<span class="arg">type</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type">goog.dom.pattern.MatchType</span></div>
      </div>


     <div class="entryOverview">
       Test whether the given token is a tag token which matches the tag name,
style, and attributes provided in the constructor.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">token</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/DOM/Node">Node</a></span></div>
        <div class="entryOverview">Token to match against.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">type</span>
        : <div class="fullType"><span class="type">goog.dom.TagWalkType</span></div>
        <div class="entryOverview">The type of token.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type">goog.dom.pattern.MatchType</span></div>&nbsp;
            <code>MATCH</code> if the pattern matches, <code>NO_MATCH</code> otherwise.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_dom_pattern_tag.js.source.html#line116">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.dom.pattern.Tag.prototype.test_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">test_<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       Function that takes the element as a parameter and returns true if this
pattern should match it.
     </div>

   
  </td>


  <td class="view-code">
     <a href="closure_goog_dom_pattern_tag.js.source.html#line104">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_dom_pattern_AbstractPattern.html">
              goog.dom.pattern.AbstractPattern
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.dom.pattern.AbstractPattern.prototype.matchToken"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">matchToken<span class="args">(<span class="arg">token</span>,&nbsp;<span class="arg">type</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type">goog.dom.pattern.MatchType</span></div>
      </div>


     <div class="entryOverview">
       Test whether this pattern matches the given token.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">token</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/DOM/Node">Node</a></span></div>
        <div class="entryOverview">Token to match against.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">type</span>
        : <div class="fullType"><span class="type">goog.dom.TagWalkType</span></div>
        <div class="entryOverview">The type of token.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type">goog.dom.pattern.MatchType</span></div>&nbsp;
            {@code MATCH} if the pattern matches.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_dom_pattern_abstractpattern.js.source.html#line56">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.dom.pattern.AbstractPattern.prototype.reset"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">reset<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>

   
  </td>


  <td class="view-code">
     <a href="closure_goog_dom_pattern_abstractpattern.js.source.html#line44">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>




<h2>Instance Properties</h2>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_dom_pattern_FullTag.html">
              goog.dom.pattern.FullTag
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.dom.pattern.FullTag.prototype.depth_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">depth_</span>
        : <div class="fullType"><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>
     </div>


     <div class="entryOverview">
       Tracks the matcher&#39;s depth to detect the end of the tag.
     </div>

  </td>


  <td class="view-code">
     <a href="closure_goog_dom_pattern_fulltag.js.source.html#line60">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_dom_pattern_Tag.html">
              goog.dom.pattern.Tag
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.dom.pattern.Tag.prototype.attrs_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">attrs_</span>
        : <div class="fullType"><span>?</span><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span></div>
     </div>


     <div class="entryOverview">
       The attributes to test for.
     </div>

  </td>


  <td class="view-code">
     <a href="closure_goog_dom_pattern_tag.js.source.html#line85">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.dom.pattern.Tag.prototype.styles_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">styles_</span>
        : <div class="fullType"><span>?</span><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span></div>
     </div>


     <div class="entryOverview">
       The styles to test for.
     </div>

  </td>


  <td class="view-code">
     <a href="closure_goog_dom_pattern_tag.js.source.html#line94">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>

<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_dom_pattern_AbstractPattern.html">
              goog.dom.pattern.AbstractPattern
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.dom.pattern.AbstractPattern.prototype.matchedNode"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">matchedNode</span>
        : <div class="fullType"><span>?</span><span class="type"><a href="http://www.google.com/url?sa=D&q=https://developer.mozilla.org/en/DOM/Node">Node</a></span></div>
     </div>


     <div class="entryOverview">
       The first node matched by this pattern.
     </div>

  </td>


  <td class="view-code">
     <a href="closure_goog_dom_pattern_abstractpattern.js.source.html#line38">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>










<div class="section">
  <table class="horiz-rule">


  </table>
</div>









<div class="section">
  <table class="horiz-rule">


  </table>
</div>
      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Package dom</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">Package Reference</h2>
            <div id="sideTypeIndex" rootPath="goog" current="dom.pattern.FullTag"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
